<template>
  <el-input-number
    size="small"
    v-model="scope.row[itemKey]"
    :disabled="type == 'detail' || type == 'approval' || type == 'examine'"
    :min="min"
    :precision="precision"
    @change="change"
  ></el-input-number>
</template>


<script lang="ts">
import { defineComponent } from 'vue'

export default defineComponent({
  props: {
    col: {
      type: Object,
      required: false,
    },
    scope: {
      type: Object,
      required: false,
    },
    type: {
      type: String,
      default: () => '',
    },
    itemKey: {
      type: String,
      default: () => '',
    },
    min: {
      type: String,
      default: () => '',
    },
    pe: {
      type: String,
      default: () => '',
    },
  },
  setup(props, { emit }) {
    const change = (value) => {
      emit('valueChange', value, props.scope)
    }
    return {
      change,
    }
  },
})
</script>
